﻿#region << 文 件 说 明 >>

/*----------------------------------------------------------------
// 文件名称：TopLeftRightUcViewBase
// 创 建 者：杨程
// 创建时间：2021/10/12 10:06:20
// 文件版本：V1.0.0
// ===============================================================
// 功能描述：
//
//
//----------------------------------------------------------------*/

#endregion

namespace Vampirewal.Core.WPF.Theme;

/// <summary>
/// 上（主模块）=>左（模块菜单）=>右（主内容）布局;适用于MainView
/// </summary>
public class TopLeftRightUcViewBase : UcViewBase
{
    #region 界面元素

    #region 顶部

    /// <summary>
    /// 顶部模块菜单
    /// </summary>
    public List<UIElement> TopBtnItems { get; set; } = new List<UIElement>();

    #endregion

    #region 左侧

    /// <summary>
    /// 左侧功能菜单区域
    /// </summary>
    public UIElement LeftMenuArea { get; set; }

    #endregion

    #endregion

    /// <summary>
    /// 构造函数
    /// </summary>
    public TopLeftRightUcViewBase()
    {
        //构造函数

        //获取样式
        var TopLeftRightUcViewBaseStyle = base.res["TopLeftRightUcViewBase"] as Style;

        this.Style = TopLeftRightUcViewBaseStyle;
    }

    static TopLeftRightUcViewBase()
    {
        DefaultStyleKeyProperty.OverrideMetadata(typeof(TopLeftRightUcViewBase), new FrameworkPropertyMetadata(typeof(TopLeftRightUcViewBase)));
    }

    public override void OnApplyTemplate()
    {
        base.OnApplyTemplate();
    }

    #region 依赖属性

    #region 顶部区域高度

    /// <summary>
    /// 顶部区域高度
    /// </summary>
    public double TopAreaHeight
    {
        get { return (double)GetValue(TopAreaHeightProperty); }
        set { SetValue(TopAreaHeightProperty, value); }
    }

    /// <summary>
    /// 顶部区域高度
    /// </summary>
    // Using a DependencyProperty as the backing store for TopAreaHeight.  This enables animation, styling, binding, etc...
    public static readonly DependencyProperty TopAreaHeightProperty =
        DependencyProperty.Register("TopAreaHeight", typeof(double), typeof(TopLeftRightUcViewBase), new PropertyMetadata(100));

    #endregion

    #region 左侧菜单区域最大宽度

    /// <summary>
    /// 左侧菜单区域最大宽度
    /// </summary>
    public double LeftMenuAreaMaxWidth
    {
        get { return (double)GetValue(LeftMenuAreaMaxWidthProperty); }
        set { SetValue(LeftMenuAreaMaxWidthProperty, value); }
    }

    /// <summary>
    /// 左侧菜单区域最大宽度
    /// </summary>
    // Using a DependencyProperty as the backing store for LeftMenuAreaMaxWidth.  This enables animation, styling, binding, etc...
    public static readonly DependencyProperty LeftMenuAreaMaxWidthProperty =
        DependencyProperty.Register("LeftMenuAreaMaxWidth", typeof(double), typeof(TopLeftRightUcViewBase), new PropertyMetadata(230));

    #endregion

    #endregion
}